import http from "../index"

export function GetFile(param={}){
    return http({
        url: `/files/${param}`,
        method: 'get',
        responseType: 'blob'
    })
}

export function GetByIdFile(param={}){
    return http({
        url: `/files/getbyid/${param}`,
        method: 'get',
        responseType: 'blob'
    })
}

export function UploadFile(param={}){
    return http.post("/files/upload",param,{
        headers: {
            'Accept': "*/*",
            'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryphiAXTDJOxUFAjQS', // 关键
        },
    })

}

export function GetImge(param={}){
    return http({
        url: `/files/${param}`,
        method: 'get',
        responseType: 'blob'
    })
}
